QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Vertex Modes

The vertexMode parameter for the QADrawVGouraud and QADrawVTexture functions specifies a vertex mode, which determines how the drawing engine interprets and draws an array of vertices.

typedef enum TQAVertexMode {
    kQAVertexMode_Point                 = 0,
    kQAVertexMode_Line                  = 1,
    kQAVertexMode_Polyline              = 2,
    kQAVertexMode_Tri                   = 3,
    kQAVertexMode_Strip                 = 4,
    kQAVertexMode_Fan                   = 5,
    kQAVertexMode_NumModes              = 6
} TQAVertexMode;

Constant descriptions

kQAVertexMode_Point
Draw points. Each vertex in the array is drawn as a point. The engine draws nVertices points (where nVertices is the number of vertices in the vertex array).
kQAVertexMode_Line
Draw line segments. Each successive pair of vertices in the array determines a single line segment. The engine draws nVertices /2 line segments.
kQAVertexMode_Polyline
Draw connected line segments. Each vertex in the array and its predecessor determine a line segment. The engine draws nVertices -1 line segments.
kQAVertexMode_Tri
Draw triangles. Each successive triple of vertices in the array determines a single triangle. The engine draws nVertices /3 triangles.
kQAVertexMode_Strip
Draw a strip of triangles. The first three vertices in the array determine a triangle, and each successive vertex and its two predecessors determine a triangle that abuts the existing strip of triangles. The engine draws nVertices -2 triangles.
kQAVertexMode_Fan
Draw a fan. The first three vertices in the array determine a triangle; each successive vertex, its immediate predecessor, and the first vertex in the array determine a triangle that abuts the existing fan. The engine draws nVertices -2 triangles.
kQAVertexMode_NumModes
The number of vertex modes currently defined.

© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |